<template>
    <div class="mt50 p40 pt0  bg-white">
        <div class="text-center f36 p20">媒体报道</div>
        <div class="ui-center-width flex row-between flex-wrap">
            
            <ui-img 
            v-if="item.smeta && item.smeta.thumb" 
            v-for="item in list" 
            :key="item.id" 
            :url="item.smeta.thumb" 
            @click.native="link(item.object_id)" 
            style="width:198px;height:106px" 
            class="ui-hover-shadow ui-border cursor-pointer mb10"
            ></ui-img>

        </div>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                list:[]
            }
        },
        mounted(){
            this.$http.get('index.php?g=home&m=content&a=get_attr_posts', {
                params:{
                    cid:16,
                    page_size:12
                }
            })
            .then(({data})=>{
                // console.log('媒体报到',data)
                if (data.code===1) {
                    this.list = data.data
                }
            })
        },
        methods:{
            link(id){
                this.$router.push({
                    name:'文章详情',
                    query:{
                        id:id
                    }
                })
            }
        },
    }
</script>